Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#20] Task 등록, 수정, 삭제 기능에 Reminder 설정 기능 추가 #21

Merged
merged 7 commits into from
Oct 11, 2024

Conversation

olivejua
Copy link
Collaborator

@olivejua olivejua commented Oct 7, 2024

배경

리마인더 알림 발송기능을 하기 전에 Task 등록시 알림 설정하는 부분이 필요할 것 같아 추가하였습니다.
Task 등록, 수정시 시작일시기준 몇분 단위마다 리마인더알림을 줄건지를 설정할 수 있도록 하였습니다.

알림 요구사항

ReminderNotificationService.java 에서 구현 (일부만 구현됨)

  • 유저의 리마인더 알림활성여부가 true여야한다.
  • Task의 리마인더 알림활성여부 true여야한다.
  • Task가 진행중인데 유저가 미접속상태일 경우 ReminderInterval 단위로 알림을 발송한다.

변경 내용

  • Task 등록시 ReminderSettings(리마인더 설정) 초기화 (Task에 리마인더활성여부가 true인 경우) 추가
  • Task 업데이트시 ReminderSettings 업데이트. 알림활성여부가 false이면 ReminderSettings 데이터 삭제, true이면 내용을 업데이트하도록 추가
  • Task 삭제시 ReminderSettings 데이터삭제 추가

참고내용

이전 리뷰내용과 ClockHolder 내용은 아직 반영 전입니다..! 이번주중에 나누어서 반영하도록 하겠습니다. 🙂

@olivejua olivejua self-assigned this Oct 7, 2024
@olivejua olivejua added the feature New feature or request label Oct 7, 2024
.build();
}

public void updateLastReminderSentTime(LocalDateTime lastReminderSentTime, ClockHolder clockHolder) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저 예전부터 궁금하던게 있는데요. clockHolder는 어떤 역할을 하는 것인가요?


@RequiredArgsConstructor
@Service
public class ReminderNotificationService {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 로직은 좀 더 고민해보고, 어떻게 할지 생각해보죠. :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 지난시간에 말씀해주신 방법과 함께 고민해보겠습니다 ㅎㅎ

Assertions.assertTrue(reminderSettings.isReminderDue(new TestClockHolder(currentDateTime)));
},
() -> {
LocalDateTime currentDateTime = taskStartDateTime.plusMinutes(3);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아항 ~ 요런 느낌이었군요 :-)

Copy link
Collaborator

@f-lab-lyan f-lab-lyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고 하셨습니다.

@olivejua
Copy link
Collaborator Author

리뷰감사합니당 ㅎㅎ

@olivejua olivejua merged commit 66bf9dd into main Oct 11, 2024
1 check passed
@olivejua olivejua deleted the feature/20-push branch October 11, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants